package com.education.online.service.impl;


import com.education.common.utils.Convert;
import com.education.online.mapper.OLessonUserBuyMapper;
import com.education.online.pojo.OLessonUserBuy;
import com.education.online.service.OLessonUserBuyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户购买课程 服务层实现
 *
 * @author d
 * @date 2020-06-04 15:17:55
 */
@Service
public class OLessonUserBuyServiceImpl implements OLessonUserBuyService {

    @Autowired
    private OLessonUserBuyMapper oLessonUserBuyMapper;

    //查询用户购买课程信息
    @Override
    public OLessonUserBuy selectOLessonUserBuyById(Integer id) {
        return oLessonUserBuyMapper.selectOLessonUserBuyById(id);
    }

    // 查询用户购买课程列表
    @Override
    public List<OLessonUserBuy> selectOLessonUserBuyList(OLessonUserBuy oLessonUserBuy) {
        return oLessonUserBuyMapper.selectOLessonUserBuyList(oLessonUserBuy);
    }

    // 新增用户购买课程
    @Override
    public int insertOLessonUserBuy(OLessonUserBuy oLessonUserBuy) {
        return oLessonUserBuyMapper.insertOLessonUserBuy(oLessonUserBuy);
    }

    //修改用户购买课程
    @Override
    public int updateOLessonUserBuy(OLessonUserBuy oLessonUserBuy) {
        return oLessonUserBuyMapper.updateOLessonUserBuy(oLessonUserBuy);
    }

    //删除用户购买课程对象
    @Override
    public int deleteOLessonUserBuyByIds(String ids) {
        return oLessonUserBuyMapper.deleteOLessonUserBuyByIds(Convert.toStrArray(ids));
    }
}